/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ufps.cuatro.util.base;

/**
 *
 * @author Carlos A. Torres C. 
 */
public class ParametroPropiedadBase extends ObjectBase{
    private static final long serialVersionUID = 6637430207135037857L;
    
    private PropiedadBase objPropiedad;
    private String strClassPath;
    private String strDefault;
    private String strMascara;
    private boolean primitive;
    private boolean array;
    private String strRender;
    private String strEditor;

    /**
     * 
     * @param objPropiedad
     * @param id
     * @param strClassPath
     * @param strDefault
     * @param strMascara
     * @param primitive
     * @param array
     * @param strRender
     * @param strEditor
     */
    public ParametroPropiedadBase(PropiedadBase objPropiedad, int id, String strClassPath, String strDefault, String strMascara, boolean primitive, boolean array, String strRender, String strEditor) {
        super(id);
        this.objPropiedad = objPropiedad;
        this.strClassPath = strClassPath;
        this.strDefault = strDefault;
        this.strMascara = strMascara;
        this.primitive = primitive;
        this.array = array;
        this.strRender = strRender;
        this.strEditor = strEditor;
    }

    /**
     * 
     * @return
     */
    public boolean isArray() {
        return array;
    }

    /**
     * 
     * @param array
     */
    public void setArray(boolean array) {
        this.array = array;
    }

    /**
     * 
     * @return
     */
    public PropiedadBase getObjPropiedad() {
        return objPropiedad;
    }

    /**
     * 
     * @param objPropiedad
     */
    public void setObjPropiedad(PropiedadBase objPropiedad) {
        this.objPropiedad = objPropiedad;
    }

    /**
     * 
     * @return
     */
    public boolean isPrimitive() {
        return primitive;
    }

    /**
     * 
     * @param primitive
     */
    public void setPrimitive(boolean primitive) {
        this.primitive = primitive;
    }

    /**
     * 
     * @return
     */
    public String getStrClassPath() {
        return strClassPath;
    }

    /**
     * 
     * @param strClassPath
     */
    public void setStrClassPath(String strClassPath) {
        this.strClassPath = strClassPath;
    }

    /**
     * 
     * @return
     */
    public String getStrDefault() {
        return strDefault;
    }

    /**
     * 
     * @param strDefault
     */
    public void setStrDefault(String strDefault) {
        this.strDefault = strDefault;
    }

    /**
     * 
     * @return
     */
    public String getStrEditor() {
        return strEditor;
    }

    /**
     * 
     * @param strEditor
     */
    public void setStrEditor(String strEditor) {
        this.strEditor = strEditor;
    }

    /**
     * 
     * @return
     */
    public String getStrMascara() {
        return strMascara;
    }

    /**
     * 
     * @param strMascara
     */
    public void setStrMascara(String strMascara) {
        this.strMascara = strMascara;
    }

    /**
     * 
     * @return
     */
    public String getStrRender() {
        return strRender;
    }

    /**
     * 
     * @param strRender
     */
    public void setStrRender(String strRender) {
        this.strRender = strRender;
    }
    
    @Override
    public String toString() {
       try{
            return "Parametro:" + this.strClassPath + " de " + this.objPropiedad.toString();
        }catch(java.lang.NullPointerException ex){}
       return "";
    }

    @Override
    public int compareTo(Object o) {
       try{ 
        ParametroPropiedadBase obj = (ParametroPropiedadBase) o;
        if(this.id > obj.id)
            return 1;
        else if(this.id < obj.id)
            return -1;
        else
            return 0;
        }catch(java.lang.NullPointerException ex){}
       return 0;
    }
    
    
}
